package com.cheng.operation;

import com.cheng.common.exception.CommonException;
import com.cheng.data.vo.ReqPageInfoVO;
import com.cheng.data.vo.RespPageInfoVO;
import com.cheng.data.vo.UserInfoVO;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author: ChengJW
 * @date: 2021/11/14 10:18
 * @version: 1.0
 * @description: 用户信息业务逻辑处理
 */
public interface UserOperation {

    /**
    * @author: ChengJW
    * @params: [pageInfoVO]
    * @return: com.cheng.data.vo.RespPageInfoVO
    * @date: 2021/11/14
    * @description: 查询用户列表信息，并分页按照统一格式返回
    */
    RespPageInfoVO queryUserList(ReqPageInfoVO pageInfoVO) throws CommonException;

    /**
     * @author: ChengJW
     * @params: [entity]
     * @return: int
     * @date: 2021/11/14
     * @description: 新增用户信息
     */
    void insertUserInfo(UserInfoVO userInfoVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [userInfoVO]
    * @return: void
    * @date: 2021/11/14
    * @description: 修改用户信息
    */
    void updateUserInfo(UserInfoVO userInfoVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [userInfoVO]
    * @return: void
    * @date: 2021/11/14
    * @description: 删除用户信息
    */
    void deleteUserInfo(UserInfoVO userInfoVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [urNm, oldUrPsd, newUrPsd]
    * @return: void
    * @date: 2021/11/20
    * @description: 修改用户密码、头像
    */
    void updateUserInfo(UserInfoVO userInfoVO,String txTpCd) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [file]
    * @return: void
    * @date: 2021/11/22
    * @description: 文件上传,并回传文件存储名称
    */
    String uploadPhoto(MultipartFile file) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [userInfoVO]
    * @return: com.cheng.data.vo.UserInfoVO
    * @date: 2021/11/24
    * @description: 查询用户信息
    */
    UserInfoVO queryUserInfo(UserInfoVO userInfoVO) throws CommonException;
}
